/**
 * Title:		T06CenterWheel.java
 * Description: Test program for center
 * 
 * @version		1.0 May 2009
 * @author		Hidemitsu Izawa (hi2136@columbia.edu)
 */
import kfrog.Frog;
import kfrog.Pond;

public class T06CenterWheel {
	
	public static void main(String args[]){
		/** pond */
		Pond pond = new Pond(400,400);//"pondsize" command in KFrog
		pond.setPondColor("WHITE");//"pondcolor" command in KFrog
		
		/** frog1 */
		Frog frog1 = new Frog(pond,1);//"new Frog" command in KFrog
		frog1.frogcolor("BLUE"); //"frogcolor" command in KFrog
		frog1.speed(5);//"speed" command in Kfrog
		
		double l=0;
		while(l<=360){
			frog1.startdraw();//"startdraw" command in KFrog
			frog1.forward(100);//"forward" command in KFrog
			frog1.turnleft(90);//"turnleft" command in KFrog
			frog1.forward(20);//"forward" command in KFrog
			frog1.stopdraw();//"enddraw" command in KFrog
			//pond.reset();
			int i = 5;
			frog1.turnleft(i);//"turnleft" command in KFrog
			l = l + i;
		}
		Thread FROG1 = new Thread(frog1);// end of "new Frog" command in KFrog
		
		
		/** frog2 */
		Frog frog2 = new Frog(pond,2);//"new Frog" command in KFrog
		frog2.frogcolor("RED");//"frogcolor" command in KFrog
		frog2.speed(5);//"speed" command in KFrog. 1:slow <-> 5:fast
		
		l=0;
		while(l<=360){
			frog2.startdraw();//"startdraw" command in KFrog
			frog2.forward(100);//"forward" command in KFrog
			frog2.turnleft(90);//"turnleft" command in KFrog
			frog2.forward(20);//"forward" command in KFrog
			frog2.stopdraw();//"enddraw" command in KFrog
			frog2.center();//"center" command in KFrog
			int i = 5;
			frog2.turnleft(i);//"turnleft" command in KFrog
			l = l + i;
		}
		Thread FROG2 = new Thread(frog2);//end of "new Frog" command in KFrog
		
		FROG1.start();/// end of "new Frog" command in KFrog
		FROG2.start();/// end of "new Frog" command in KFrog
		
		
	}
}
